package problem06;

import java.util.Scanner;

import org.junit.Before;
import org.junit.Test;

public class TestHanio {

	int n; 
	String start;
	String tran;
	String end;
	
	@Before
	public void prepare(){
		System.out.println("请输入原始的圆盘数，以及初始，辅助和目标柱：\n比如：3 left mid right");
		Scanner scanner = new Scanner(System.in);
		String[] str = scanner.nextLine().split("\\s+");
		n=Integer.valueOf(str[0]);
		start = str[1];
		tran=str[2];
		end = str[3];
	}
	/**
	 * 测试原始的汉诺塔问题
	 */
	@Test
	public void demo1(){
		int step=Hanio.HanioMain(3, start, tran, end,0);
	}
	@Test
	public void demo2(){
		int step = Limit_Hanio_recursion.HanioMain(n, start, tran, end,0);
		System.out.println("It will move "+step+" steps");
	}
}
